public class Date {
    public int year;
    public int month;
    public int day;

    public Date(int year,int month,int day)
    {
        this.year=year;
        this.month=month;
        this.day=day;
        System.out.println("Date方法被调用了!");
    }
    public void setDate()
    {
        System.out.println(year+"/"+month+"/"+day);
    }

    public static void main(String[] args) {
        Date d=new Date(2022,7,21);
        d.setDate();
    }
}
